-- GENERATED SPELL FOR [Ethereal Apprentice] --


function spell0_18430(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(32369,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18430', 3000, 1)
end

function spell1_18430(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(32370,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18430', 7000, 1)
end

function Sorts_18430(pUnit, Event)
local choix_sorts_18430 = math.random(0, 1)
if choix_sorts_18430 == 0 then
pUnit:RegisterEvent('spell0_18430', 1, 1)
end
if choix_sorts_18430 == 1 then
pUnit:RegisterEvent('spell1_18430', 1, 1)
end
end

function mob18430_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18430', math.random(1500, 3000), 1)
end

function mob18430_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18430_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18430_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18430, 1, 'mob18430_Action')
RegisterUnitEvent(18430, 2, 'mob18430_Leave')
RegisterUnitEvent(18430, 3, 'mob18430_Kill')
RegisterUnitEvent(18430, 4, 'mob18430_Die')
